//
//  StepDataIconCell.swift
//  MoyoungHome
//
//  Created by 李然 on 2022/9/17.
//

import UIKit
import MYModule

class ActivityDataIconCell: StackView {

	lazy var iconView: ImageView = {
		let view = ImageView()
		return view
	}()

	lazy var dataLabel: Label = {
		let label = Label()
		label.textColor = UIColor.assist_222222
		label.font = Fonts.systemFont(ofSize: 24)
		label.textAlignment = .center
		return label
	}()

	lazy var unitLabel: Label = {
		let label = Label()
		label.textColor = UIColor.assist_000000
		label.font = Fonts.systemFont(ofSize: 11)
		label.textAlignment = .center
		return label
	}()

	override func makeUI() {
		super.makeUI()

		self.spacing = 6
		self.axis = .vertical
		self.alignment = .center
		self.contentMode = .center

		self.addArrangedSubview(iconView)

		let subStack = StackView()
		subStack.axis = .vertical
		self.alignment = .center
		self.contentMode = .center

		subStack.addArrangedSubview(dataLabel)
		subStack.addArrangedSubview(unitLabel)

		self.addArrangedSubview(subStack)
	}
}
